import { ActivityIndicator, View, StyleSheet, Text } from 'react-native'

export function Loading() {
  return (
    <View style={styles.container}>
      <View style={styles.inner}>
        <ActivityIndicator size="large" />
        <Text style={styles.text}>Loading</Text>
      </View>
    </View>
  )
}

const styles = StyleSheet.create({
  container: {
    position: 'absolute',
    top: 0,
    left: 0,
    width: '100%',
    height: '100%',
    backgroundColor: 'rgba(0, 0, 0, 0.2)',
    zIndex: 2
  },
  inner: {
    flex: 1,
    justifyContent: 'center',
    alignItems: 'center'
  },
  text: {
    color: '#fff'
  }
})